<include file="Public/min-header" />
<div class="wrapper">
    <include file="Public/breadcrumb" />
    <section class="content">
        <div class="row">
            <div class="col-sm-12">
                <div class="box">
                    <div class="box-header">
                        <h3 class="box-title"><if condition="$act eq 'add'">增加<else />编辑</if>分类</h3>
                        <div class="pull-right">
                            <a href="javascript:history.go(-1)" data-toggle="tooltip" title="" class="btn btn-default" data-original-title="返回"><i class="fa fa-reply"></i></a>
                        </div>
                    </div>
                    <form action="{:U('Goods/addEditCategory')}" method="post" class="form-horizontal" id="category_form">
                        <div class="box-body">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">分类名称</label>
                                <div class="col-sm-6">
                                    <input type="text" placeholder="名称" class="form-control large" name="name" value="{$goods_cat_info.name}">
                                    <span class="help-inline" style="color:#F00; display:none;" id="err_name"></span>
                                </div>
                            </div>
							<div class="form-group">
                                <label class="col-sm-2 control-label">分类名称(日语)</label>
                                <div class="col-sm-6">
                                    <input type="text" placeholder="名称" class="form-control large" name="en_name" value="{$goods_cat_info.en_name}">
                                    <span class="help-inline" style="color:#F00; display:none;" id="err_en_name"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-2">上级分类</label>
                                <div class="col-sm-4">
                                    <select name="cat_id" id="cat_id" class="small form-control">
                                        <option value="0">顶级分类</option>
                                        <foreach name="cat_list" item="v">
                                            <option value="{$v[id]}">{$v[name]}</option>
                                        </foreach>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-2">分类图片</label>
                                <div class="col-sm-10">
									<input type="text" name="image" id="fileImage" value="{$goods_cat_info['image']}" class="form-control" style="width:300px;">
									<button type="button" class="layui-btn" id="upload_img">
									  <i class="layui-icon">&#xe67c;</i>上传图片
									</button>
									<if condition="$goods_cat_info['image'] neq ''">
										<a href="{$goods_cat_info['image']}" target="_blank">
											<img src="{$goods_cat_info['image']}" height="34">
										</a>
									</if>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-2">显示排序</label>
                                <div class="col-sm-1">
                                    <input type="text" placeholder="50" class="form-control large" name="sort_order" value="{$goods_cat_info.sort_order}" />
                                    <span class="help-inline" style="color:#F00; display:none;" id="err_sort_order"></span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="text" class="col-sm-2 control-label">是否显示</label>
                                <div class="col-sm-5" style="margin-top:5px;">
                                    <div class="col-sm-2">
                                        <label>
                                            <input type="radio" name="status" value="1" <if condition="$goods_cat_info['status'] eq 1">checked</if>> 显示 </label>
                                    </div>
                                    <div class="col-sm-2">
                                        <label>
                                            <input type="radio" name="status" value="0" <if condition="$goods_cat_info['status'] eq 0">checked</if>> 不显示</label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="box-footer">
                            <input type="hidden" name="id" value="{$goods_cat_info.id}">
                            <input type="hidden" name="act" value="{$act}">
                            <button type="reset" class="btn btn-primary pull-left"><i class="icon-ok"></i>重填 </button>
                            <input type="submit" class="btn btn-primary pull-right" value="提交">
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </section>
</div>
</body>
</html>
